package com.d3works.apps.stock.service;

import com.d3works.apps.base.db.Product;
import com.d3works.apps.stock.db.*;
import com.d3works.exception.D3worksException;
import java.math.BigDecimal;
import java.util.Map;

public interface StockCorrectionService {

  public Map<String, Object> fillDefaultValues(StockLocationLine stockLocationLine);

  public Map<String, Object> fillDeafultQtys(StockCorrection stockCorrection);

  public void getDefaultQtys(
      StockLocationLine stockLocationLine, Map<String, Object> stockCorrectionQtys);

  public boolean validate(StockCorrection stockCorrection) throws D3worksException;

  StockCorrection generateStockCorrection(
      StockLocation stockLocation,
      Product product,
      TrackingNumber trackingNumber,
      BigDecimal realQty,
      StockCorrectionReason reason)
      throws Exception;

  void updateCorrectionQtys(StockCorrection stockCorrection, BigDecimal realQty);

  void updateReason(StockCorrection stockCorrection, StockCorrectionReason reason);
}
